package com.minutemouse.generator;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;

public class DetailDisplay extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail_display);
        
        Intent intent = getIntent();
        
        final ImageView img = (ImageView) findViewById(R.drawable.big2);
        final Button b = (Button) findViewById(R.id.ZoomPowerImageButton);
        b.setClickable(true);
        
        b.setOnClickListener(new View.OnClickListener() {
        	public void onClick(View v) {
        		//img.setVisibility(View.INVISIBLE);
        	//	img.setImageResource(R.drawable.btn_add);
				Toast.makeText(getApplicationContext(), "Clicked", Toast.LENGTH_LONG).show();
				b.setVisibility(View.INVISIBLE);
				showLargeImg(v);
        	}
        });
        
    }
    
    public void showLargeImg(View v) {
    	final ImageView bigView = (ImageView) findViewById(R.id.ZoomPowerImage);
    	
    	setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    	
    	bigView.setVisibility(View.VISIBLE);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_detail_display, menu);
        return true;
    }

    
}
